package com.hsp_java.map_;

import java.util.Properties;

public class Properties_ {
    public static void main(String[] args) {
        //
         //1. Properties 继承 Hashtable
        //2. 可以通过 k-v 存放数据 当然key 和 value 不能为null


        Properties properties = new Properties();
        properties.put("flm", 100);
        //properties.put(null, 234);
        //properties.put(234, null);

        properties.put("flm" , 114514);//如果有相同的key value 会被替换

        properties.put("fgd", 100);
        properties.put("dfxc", 100);
        properties.put("m,lj", 100);

        System.out.println(properties);

        //通过key 获取 对应的值
        System.out.println(properties.get("flm"));

        //删除
        properties.remove("m,lj");


        System.out.println(properties);

    }
}
